<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
 
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp"> 
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了网站所有的充值订单信息，可对充值订单进行审核删除操作。</div>
<div class="admin_new_tip_list">可输入名称关键字进行搜索，也可进行详细的高级搜索。</div>
</div>
</div>

<div class="clear"></div>

<div class="admin_new_search_box"> 
  <form action="index.php" name="myform" method="get">
            <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}"> 
            <input name="m" value="company_order" type="hidden"/>   
            <input name="typezf" value="{yun:}$smarty.get.typezf{/yun}" type="hidden"/>   
            <input name="typedd" value="{yun:}$smarty.get.typedd{/yun}" type="hidden"/>   
            <input name="order_state" value="{yun:}$smarty.get.order_state{/yun}" type="hidden"/>
            <input name="fb" value="{yun:}$smarty.get.fb{/yun}" type="hidden"/>  
	<div class="admin_new_search_name">搜索类型：</div>
    	<div class="admin_Filter_text formselect"  did='dtypeca'>
			  <input type="button" value="{yun:}if $smarty.get.typeca==''{/yun}充值单号{yun:}else{/yun}用户名称{yun:}/if{/yun}" class="admin_Filter_but"  id="btypeca">
			  <input type="hidden" id='typeca' value="{yun:}if $smarty.get.typeca==''{/yun}1{yun:}else{/yun}{yun:}$smarty.get.typeca{/yun}{yun:}/if{/yun}" name='typeca'>
			  <div class="admin_Filter_text_box" style="display:none" id='dtypeca'>
				  <ul>
				  <li><a href="javascript:void(0)" onClick="formselect('1','typeca','充值单号')">充值单号</a></li>
				  <li><a href="javascript:void(0)" onClick="formselect('2','typeca','用户名称')">用户名称</a></li>                  
				  </ul>  
			  </div>
			</div>
            <input class="admin_Filter_search"  placeholder="输入你要搜索的关键字" type="text" name="keyword"  size="25" style="float:left"> 
            <div class="admin_new_search_name1">充值时间：</div>
            <input id="time" class="comy_time_text" type="text" readonly name="time_start1" style="width:100px;" value="{yun:}$smarty.get.time_start1{/yun}" lay-key="1">
            <input type="text" id="time_end" class="comy_time_text" name="time_end1" style="width:100px;"  readonly="" value="{yun:}$smarty.get.time_end1{/yun}" lay-key="2">
            <input class="admin_Filter_bth"  type="submit" name="news_search" value="检索"/>
	<a  href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();"   class="admin_new_search_gj" style="float:left">高级搜索</a> <input class="admin_button" type="button" value="导出" onClick="Export();" style="float:left; margin-left:10px;height:30px; background:#f60" /></form>
    {yun:}include file="admin/admin_search.htm"{/yun}
  </div>
<div class="clear"></div>
<div class="table-list">
<div class="admin_table_border">
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
<form action="index.php" name="myform" id='myform' method="get" target="supportiframe">
<input type="hidden" name="pytoken" id='pytoken'  value="{yun:}$pytoken{/yun}">
<input name="m" value="company_order" type="hidden"/>
<input name="c" value="del" type="hidden"/>
<table width="100%">
	<thead>
		<tr class="admin_table_top">
		   <th style="width:20px;"><label for="chkall"><input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/></label></th>
            
            <th>
			{yun:}if $smarty.get.t=="id" && $smarty.get.order=="asc"{/yun}
			<a href="{yun:}searchurl order=desc t=id m=company_order untype='order,t'{/yun}">编号<img src="images/sanj.jpg"/></a>
            {yun:}else{/yun}
            <a href="{yun:}searchurl order=asc t=id m=company_order untype='order,t'{/yun}">编号<img src="images/sanj2.jpg"/></a>
            {yun:}/if{/yun}
			</th>
			<th align="left">用户名称</th>
			<th align="left">公司名称（姓名）</th>
            <th align="left">充值单号</th>
			<th align="left">支付类型</th>
            <th align="left">订单类型</th> 
            <th align="left">
			{yun:}if $smarty.get.t=="order_price" && $smarty.get.order=="asc"{/yun}
			<a href="{yun:}searchurl order=desc t=order_price m=company_order untype='order,t'{/yun}">订单金额<img src="images/sanj.jpg"/></a>
            {yun:}else{/yun}
            <a href="{yun:}searchurl order=asc t=order_price m=company_order untype='order,t'{/yun}">订单金额<img src="images/sanj2.jpg"/></a>
            {yun:}/if{/yun}
			</th>
            
            <th>
			{yun:}if $smarty.get.t=="order_time" && $smarty.get.order=="asc"{/yun}
			<a href="{yun:}searchurl order=desc t=order_time m=company_order untype='order,t'{/yun}">时间<img src="images/sanj.jpg"/></a>
            {yun:}else{/yun}
            <a href="{yun:}searchurl order=asc t=order_time m=company_order untype='order,t'{/yun}">时间<img src="images/sanj2.jpg"/></a>
            {yun:}/if{/yun}
			</th>
			<th>状态</th>
			<th class="admin_table_th_bg">操作</th>
		</tr>
	</thead>
	<tbody>
   {yun:}foreach item=job key=key from=$rows{/yun}
    <tr align="center"{yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$job.id{/yun}">
	    <td><input type="checkbox" value="{yun:}$job.id{/yun}" class="check_all" name='del[]' onclick='unselectall()' rel="del_chk" /></td>
    	<td align="left" class="td1"><span>{yun:}$job.id{/yun}</span></td> 
		<td align="left">{yun:}$job.username{/yun}</td>
		<td align="left">{yun:}$job.comname{/yun}</td>
   	 	<td align="left">{yun:}$job.order_id{/yun}</td>
		<td align="left">{yun:}$job.order_type_n{/yun}</td>
        <td align="left">
        	{yun:}if $job.type==1{/yun}购买会员
        	{yun:}elseif $job.type=='2'{/yun}{yun:}$config.integral_pricename{/yun}充值
        	{yun:}elseif $job.type=='3'{/yun}银行转帐
        	{yun:}elseif $job.type=='4'{/yun}金额充值
        	{yun:}elseif $job.type=='5'{/yun}购买增值包
        	{yun:}elseif $job.type=='6'{/yun}课程订购
        	{yun:}elseif $job.type=='7'{/yun}购买小程序
			{yun:}elseif $job.type=='8'{/yun}分享职位赏金
			{yun:}elseif $job.type=='9'{/yun}悬赏职位赏金
        	{yun:}elseif $job.type=='10'{/yun}购买职位置顶
        	{yun:}elseif $job.type=='11'{/yun}购买紧急招聘
        	{yun:}elseif $job.type=='12'{/yun}购买职位推荐
        	{yun:}elseif $job.type=='13'{/yun}购买职位自动刷新
        	{yun:}elseif $job.type=='14'{/yun}简历置顶
        	{yun:}elseif $job.type=='15'{/yun}委托简历
			{yun:}elseif $job.type=='16'{/yun}职位刷新
			{yun:}elseif $job.type=='17'{/yun}兼职刷新
			{yun:}elseif $job.type=='18'{/yun}高级职位刷新
			{yun:}elseif $job.type=='19'{/yun}下载简历
			{yun:}elseif $job.type=='20'{/yun}发布职位
			{yun:}elseif $job.type=='21'{/yun}发布兼职
			{yun:}elseif $job.type=='22'{/yun}发布高级职位
			{yun:}elseif $job.type=='23'{/yun}面试邀请
			{yun:}elseif $job.type=='24'{/yun}兼职推荐
			{yun:}elseif $job.type=='25'{/yun}店铺招聘
			{yun:}elseif $job.type=='26'{/yun}购买广告位
        	{yun:}/if{/yun}</td>
    	<td align="left">{yun:}$job.order_price{/yun}</td>
        <td>{yun:}$job.order_time|date_format:"%Y-%m-%d %H:%M"{/yun}</td>
   	 	<td>{yun:}$job.order_state_n{/yun}</td>
    	<td align="left" style="text-align:center;">
			<a href="index.php?m=company_order&c=edit&id={yun:}$job.id{/yun}"  class="admin_new_c_bth admin_new_c_bth_yl">查看</a> 
            
        	<a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=company_order&c=del&id={yun:}$job.id{/yun}');"class="admin_new_c_bth admin_new_c_bth_sc ">删除</a>
        	{yun:}if $job.order_state==1||$job.order_state==3{/yun}
				<br/>
				<a href="javascript:void(0)" onClick="layer_del('确认该订单将充值到用户帐户，是否确定？', 'index.php?m=company_order&c=setpay&id={yun:}$job.id{/yun}');" class="admin_new_c_bth  " >确认</a>
                
				<a href="index.php?m=company_order&c=edit&id={yun:}$job.id{/yun}"  class="admin_new_c_bth">修改</a> 
			{yun:}/if{/yun}
        </td>
  </tr>
  {yun:}/foreach{/yun}
  <tr style="background:#f1f1f1;">
  <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
  <td colspan="3" >
  <label for="chkAll2">全选</label>&nbsp;
    <input class="admin_button" type="button" name="delsub" value="删除所选" onClick="return really('del[]')" />
    </td>
    <td colspan="7" class="digg">{yun:}$pagenav{/yun}</td>
  </tr>
  </tbody>
  </table>
</form>
</div></div>
</div>
<div id="export" style="display:none;">
	<div style=" margin-top:10px;">
    <div>
      <form action="index.php?m=company_order&c=xls" target="supportiframe" method="post" id="formstatus" class="myform"  onSubmit="return check_form();">
      <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
      <input type="hidden" name="where" value="{yun:}$where{/yun}">
      <input name="uid" value="" type="hidden">
      <input type="hidden" name="time_start" >
      <input type="hidden" name="time_end" >
      </form>
    </div>
  </div>
</div>
<style>
.admin_resume_dc_sub1{width:350px; text-align:center;}
.admin_new_search_name1{width:60px; line-height:28px; float:left;}
</style>
<script>
function Export(){
	var codewebarr="";
	$(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
		if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
	});
	$("input[name=uid]").val(codewebarr);
	layer.confirm("确定导出充值记录吗？",function(){
		setTimeout(function(){$('#formstatus').submit()},0); layer.closeAll();
	});
}
layui.use(['laydate'], function(){
	var laydate = layui.laydate
	,$ = layui.$;

	laydate.render({
		elem: '#time'
	});

	laydate.render({
		elem: '#time_end'
	});
});
function check_form(){
	$("input[name=time_start]").val('');
	$("input[name=time_end]").val('');
	var time = $("#time").val();
	var time_end = $("#time_end").val();
	if(time_end != '' && time != ''){
		var date1 = new Date(time+" 00:00:00");
		var time1 = date1.getTime();
		var date2 = new Date(time_end+" 23:59:59");
		var time2 = date2.getTime();
		$("input[name=time_start]").val(time1);
		$("input[name=time_end]").val(time2);
		if(time2<=time1){
			parent.layer.msg('结束时间不能小于开始时间！', 2,8);
			return false
		}
	}else{
		if(time != ''){
			var date1 = new Date(time+" 00:00:00");
			var time1 = date1.getTime();
			$("input[name=time_start]").val(time1);
		}
		if(time_end != ''){
			var date2 = new Date(time_end+" 23:59:59");
			var time2 = date2.getTime();
			$("input[name=time_end]").val(time2);		
		}
	}
}
</script>
</body>
</html>